Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

byline

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

byline

simple line-by-line stream reader

  • 4.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9M
decreased by-12.72%
Maintainers
1
Weekly downloads
 
Created

What is byline?

The byline npm package is designed to help with reading lines from a stream, such as a file or stdin, efficiently. It wraps Node.js streams and allows for easy line-by-line processing without having to manage buffering or line splitting manually. This can be particularly useful for reading large files or processing real-time data feeds where handling data line-by-line is necessary.

What are byline's main functionalities?

Line-by-line Stream Reading

This feature allows you to read from a stream line-by-line. The code sample demonstrates how to create a readable stream from a file and use byline to process each line as it becomes available.

const byline = require('byline');
const fs = require('fs');

let stream = byline(fs.createReadStream('file.txt', { encoding: 'utf8' }));

stream.on('data', function(line) {
  console.log(line);
});

Other packages similar to byline

FAQs

Package last updated on 21 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc